<?php

/**
 * Project Model
 * @author PhuND
 */
class Mproject_answer extends CI_Model {

    private $tableName = 'project_answer';

    public function __construct() {
        $this->load->database();
    }

    /**
     * Get Project by Rand()
     * @return row
     */
    public function getByQuestion($question_id) {
        $this->db->cache_on();
        $this->db->select();
        $this->db->where('id_question', $question_id);
        $this->db->order_by('id');
        $query = $this->db->get($this->tableName);
        return $query->result_array();
    }

}